from DebugTrace import DebugTrace

class HeaterDriver(object):
        def __init__(self, adcInput, traceLevel=1):
                self.currentState=0
                self.trace=DebugTrace("Heater",traceLevel)
                self.outputSR = None
                self.outputPin = 0
                self.adcInput = adcInput
     
        def addOutputSR(self,outputSR, outputPin):
                self.outputSR = outputSR
                self.outputPin = outputPin
        def enableHeater(self):
                self.currentState=1
                self.outputSR.setPinValue(outputPin,True)
                self.outputSR.shiftAll()
        def disableHeater(self):
                self.currentState=0
                self.outputSR.setPinValue(outputPin,False)
                self.outputSR.shiftAll()
        def getHeaterState(self):
                return self.currentState
        def getadcInput(self):
                return self.adcInput